package com.shouer.doc.ui.neworder.model;

import android.text.TextUtils;

import com.google.gson.annotations.Expose;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by ZXL on 2016/11/28.
 */

public class PatRecordModel implements Serializable{

    @Expose
    private String patRecordId;
    @Expose
    private String departmentName;
    @Expose
    private String patDescribe;
    @Expose
    private String patPage1;
    @Expose
    private String patPage2;
    @Expose
    private String patPage3;
    @Expose
    private String patPage4;
    @Expose
    private String patPage5;
    @Expose
    private String patPage6;

    private List<String> patPages;

    public String getPatRecordId() {
        return patRecordId;
    }

    public void setPatRecordId(String patRecordId) {
        this.patRecordId = patRecordId;
    }

    public String getDepartmentName() {
        return departmentName;
    }

    public void setDepartmentName(String departmentName) {
        this.departmentName = departmentName;
    }

    public String getPatDescribe() {
        return patDescribe;
    }

    public void setPatDescribe(String patDescribe) {
        this.patDescribe = patDescribe;
    }

    public String getPatPage1() {
        return patPage1;
    }

    public void setPatPage1(String patPage1) {
        this.patPage1 = patPage1;
    }

    public String getPatPage2() {
        return patPage2;
    }

    public void setPatPage2(String patPage2) {
        this.patPage2 = patPage2;
    }

    public String getPatPage3() {
        return patPage3;
    }

    public void setPatPage3(String patPage3) {
        this.patPage3 = patPage3;
    }

    public String getPatPage4() {
        return patPage4;
    }

    public void setPatPage4(String patPage4) {
        this.patPage4 = patPage4;
    }

    public String getPatPage5() {
        return patPage5;
    }

    public void setPatPage5(String patPage5) {
        this.patPage5 = patPage5;
    }

    public String getPatPage6() {
        return patPage6;
    }

    public void setPatPage6(String patPage6) {
        this.patPage6 = patPage6;
    }

    public List<String> getPatPages() {

        if (null!=patPages)
        {
            return patPages;
        }else
        {
            addToPatPages(patPage1);
            addToPatPages(patPage2);
            addToPatPages(patPage3);
            addToPatPages(patPage4);
            addToPatPages(patPage5);
            addToPatPages(patPage6);
        }
        return patPages;
    }

    private void addToPatPages(String url)
    {
        if (null==patPages)
        {
            patPages=new ArrayList<>(0);
        }
        if (!TextUtils.isEmpty(url))
        {
            patPages.add(url);
        }
    }
}
